package com.lagou.sqlSession;

import com.lagou.pojo.Configuration;
import com.lagou.pojo.MappedStatement;

import java.util.List;

/**
 * @author lgq
 */
public interface Executor {

	/**
	 * 查询
	 *
	 * @param configuration
	 * @param mappedStatement
	 * @param params
	 * @param <E>
	 * @return
	 * @throws Exception
	 */
	<E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

	/**
	 * 更新(包括增删改)
	 *
	 * @param configuration
	 * @param mappedStatement
	 * @param params
	 * @return
	 * @throws Exception
	 */
	int update(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;
}
